package com.naszetatry.main;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Glowny serwlet. Bez parametrow przekierowuje do mapy.
 * Pomocniczo uzywany do przekierowanie na inne strony, podajac parametr
 * @author Maciej Koch
 *
 */
public class Main extends HttpServlet{

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		if("about".equals(request.getParameter("do"))) {
			getServletContext().getRequestDispatcher("/jsp/about.jsp").forward(request, response);	
			return;
		}
		
		getServletContext().getRequestDispatcher("/map").forward(request, response);	
	}
}
